﻿
using ZYLFramework.Manage;
using ZYLFramework.UI;

namespace Game.UI
{
    public class GamePanelCtrl:UICtrl
    {
        public GamePanelView View;
        public GamePanelModel Model;
        public override void Init()
        {
            View = BaseView as GamePanelView;
            Model = BaseModel as GamePanelModel;
            
            View?.GameBtn1.onClick.AddListener(StartClassicalGame);
            View?.GameBtn2.onClick.AddListener(Start3dGame);
            View?.QuitBtn.onClick.AddListener(QuitGame);
        }

        public void StartClassicalGame()
        {
            EventManage.Instance.Notify(EventEnum.StartBaseGame);
        }
        
        public void Start3dGame()
        {
            EventManage.Instance.Notify(EventEnum.Start3dGame);
        }
        
        public void QuitGame()
        {
            EventManage.Instance.Notify(EventEnum.QuitGame);
        }
    }
}
